package lcs;

import java.io.Serializable;

public class State implements Serializable {
	private static final long serialVersionUID = 8135644747231266793L;
	private Integer cooldown;
	private Integer distanceState;
	private Integer enemyCount;
	private Integer healthState;
	public State(Integer cooldown, Integer distanceState, Integer enemyCount, Integer healthState) {
		
		this.cooldown = cooldown;
		this.distanceState = distanceState;
		this.enemyCount = enemyCount;
		this.healthState = healthState;
	}
	
	@Override
	public boolean equals(Object o)
	{
		if( o instanceof State )
		{
			State q = (State)o;
			return (this.cooldown == q.cooldown || this.cooldown == null || q.cooldown == null)
					&& (this.distanceState == q.distanceState || this.distanceState == null || q.distanceState == null)
					&& (this.enemyCount == q.enemyCount || this.enemyCount == null || q.enemyCount == null)
					&& (this.healthState == q.healthState || this.healthState == null || q.healthState == null);
		}
		return false;
	}

	public Integer getCooldown() {
		return cooldown;
	}

	public void setCooldown(Integer cooldown) {
		this.cooldown = cooldown;
	}

	public Integer getDistanceState() {
		return distanceState;
	}

	public void setDistanceState(Integer distanceState) {
		this.distanceState = distanceState;
	}

	public Integer getEnemyCount() {
		return enemyCount;
	}

	public void setEnemyCount(Integer enemyCount) {
		this.enemyCount = enemyCount;
	}

	public Integer getHealthState() {
		return healthState;
	}

	public void setHealthState(Integer healthState) {
		this.healthState = healthState;
	}
}
